/*
var day = new Date().getDay();
console.log(day);

var  con;
switch (day){
    case 6:
        con = "今天是周六";
        break;
    case 0:
        con = "今天是周日";
        break;
    default:
        con = "期待放假";
}
console.log(con);
*/

/*
/for循环
for (var yz =1;yz<=10;yz++){
    console.log("第"+yz+"遍好好学习，天天向上");
}
*/

/*
//while 循环
var o =0;
var arr = ["杨振1","杨振2","杨振3"];
while(o<3){
    console.log(arr[o]+"一直就挺好看");
    o++;
}
*/

/*
var y = 0;
var z = 0;
while (y<=100){
    y+=2;//y = y + 2
    z+=y;//z = z + y
}
console.log(z);
*/

/*
var y = 250000;
var z = 2016;
while (y<=1000000){
    y= y*1.25;
    z= z+1;
}
console.log(z);
*/

/*
var t = 0;
var yz = 2001;


for(yz;yz<=2019;yz++){
    if (yz % 4 ==0 && yz % 100!=0 || yz %400==0){
         t = t + 366;
        console.log(t)
    }else {
        t = t + 365;
        console.log(t)
    }
}
alert("活了"+t+"天");

*/
/*
var yz = 0;
for (var t=1;t<=5;t++) {
    var p = prompt("请输入第" + t + "门成绩");
    p = Number(p);
    //console.log(p);
    yz = yz + p;
}
alert("你的结业成绩平均分数为："+yz/5 + "分");
//把除5去掉就变成了总分
*/


/*
//嵌套循环 --二重循环
for (j=1;j<=2;j++){
    var yz =0;
    for(t = 1;t <= 5;t++){

        var p = prompt(j+"班的第" + t + "门成绩");
        p = Number(p);//p转换为数字
        console.log(p);
        yz = yz+p
    }
    alert(j+"班的平均成绩是："+yz / 5+"分");
}
*/

/*
for ( var yz=1; yz<=6;yz++){
    if (yz == 5){
        continue;//数值到五就跳过显示当前的数值
    }
    console.log(yz);
}

for( var zy = 1; zy<=6; zy++){
    if (zy ==5){
        break;//数值到五就停止显示下面的数值
    }
    console.log(zy);
}
*/
/*
for ( var t=1;t<=5;t++){
    for ( var j=1;j<=5;j++){
        document.write("*");
    }
    document.write("<br>");
}
*/

for (var a=0;a<15;a++) {
    for (var j=1;j<15-a;j++) {
        document.write("&ensp;");
    }
    for(k=1;k<a*2;k++){
           document.write("*");
    }
    document.write("<br>");
}
